package com.fsp.blog.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fsp.blog.admin.pojo.Permission;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author fushengping
 * @interface PermissionMapper
 * @description
 * @date 2021/11/23 23:37
 */
public interface PermissionMapper extends BaseMapper<Permission> {
    @Select("select * from ms_permission as m where m.id in (select ap.permission_id from ms_admin_permission as ap where ap.admin_id = #{adminId})")
    List<Permission> findPermissionsByAdminId(Long adminId);
}
